package com.xishu.entity.hardware;

import com.xishu.entity.AbstractEntity;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * 修改打印机标签的时候，记住标签与打印机的关系
 * <p>
 * 那么在另外的打印将这个标签放在该打印机上的时候，需要判断以前的打印机的任务是否还存在，如果存在，则将这些任务重新打印下
 */
@Entity(name = "label_to_printer")
@Table(indexes = {@Index(columnList = "shopId")})
public class LabelToPrinter extends AbstractEntity {
    @ApiModelProperty(value = "打印标签")
    private String label;

    @ApiModelProperty(value = "打印机")
    private Long printerId;

    @ApiModelProperty(value = "分店ID")
    private Long shopId;

    public LabelToPrinter() {
    }

    public LabelToPrinter(String label, Long printerId, Long shopId) {
        this.label = label;
        this.printerId = printerId;
        this.shopId = shopId;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public Long getPrinterId() {
        return printerId;
    }

    public void setPrinterId(Long printerId) {
        this.printerId = printerId;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }
}
